#include "T9manager.h"


int main(int argc, char *argv[]){
	
	Data data;
	initData(&data);
	data.listat9=initDictionary("./word_list.txt",data);	
	data.currentnode=data.listat9;
   	GError *error = NULL;
    	gtk_init( &argc, &argv ); 
    	data.builder = gtk_builder_new();
   	if(!gtk_builder_add_from_file(data.builder, "./numpadtest2.glade", &error))
    	{
        	g_warning("%s", error->message);
        	g_free(error);
		return(1);
    	}
   
    	data.the_window1 = GTK_WIDGET(gtk_builder_get_object(data.builder, "window1"));
	gtk_window_set_position(GTK_WINDOW(data.the_window1),GTK_WIN_POS_NONE);   	
	data.textarea = GTK_WIDGET(gtk_builder_get_object(data.builder, "entry1")); 
	data.trayIcon  = gtk_status_icon_new_from_file ("./calc.png");
	gtk_status_icon_set_visible(data.trayIcon, FALSE); 
	gtk_status_icon_set_tooltip (data.trayIcon, "Click to maximize your NumPad");
   	add_all_events(&data);	
   	gtk_widget_show(data.the_window1);
	gtk_main();
	g_object_unref(G_OBJECT(data.builder));
	return(0);
}
